Conventionally, there are a number of image capturing apparatuses such as an electronic camera for recording and reproducing still images or moving images captured by a solid-state image sensor such as a CCD or CMOS image sensor.
As an example of techniques related to solid-state image sensors mounted on those image capturing apparatuses, Japanese Patent Laid-Open No. 2003-244712 and other publications propose a technique in which the photoelectric conversion units in all or some of the pixels constituting a solid-state image sensor are divided into several units (divided pixel). Applications of this kind of image sensors may include performing pupil division-type focus detection or generating stereoscopic images based on output signals independently obtained from the divided photoelectric conversion units. It is also possible to add the output signals from the divided photoelectric conversion units in each pixel and use the added signal as a normal image signal.
Incidentally, many recent electronic cameras are equipped with an image sensor having millions to tens of millions of pixels, while it is very difficult to manufacture an image sensor in which every pixel properly converts the incident light amount into electric signals. In practice, several “defective pixels” that do not work normally may exist among the pixels in the image sensor.
Therefore, in conventional image capturing apparatuses, corrections such as interpolation for a finally generated image are performed on an image signal corresponding to the position of such a defective pixel, using image signals from neighboring pixels of the defective pixel.
There are several methods for detecting a defective pixel to be a subject for correction. For example, in a manufacturing process of an image capturing apparatus or an image sensor, an address of a defective pixel detected based on a captured image may be recorded and stored in a memory in an image capturing apparatus.
Another detection method, which is proposed in Japanese Patent Laid-Open No. S61-261974 for example, is a real-time defective pixel detection method in which during each image capture by the image capturing apparatus it is determined whether or not a pixel that is the subject for detection is a defective pixel based on a level difference between an image signal from that pixel and an image signal from the neighboring pixels.
However, the above-mentioned defective pixel detection in a solid-state image capturing apparatus using an image sensor with divided pixels has the following problem; it is difficult to always accurately determine whether or not a pixel that is the subject for detection is a defective pixel or a normal pixel that outputs correct object information. Therefore, if a normal pixel is determined to be a defective pixel by error, there is also a risk of erroneous correction, resulting in the situation where an image signal based on actual incident light from an object is unnecessarily corrected. More specifically, output values obtained from a plurality of photoelectric conversion units in the above-described divided pixel are different from one another in a state where the object is not focused in the vicinity of the divided pixel. Accordingly, depending on the state of a photographing lens, a defective pixel may not be accurately detected with the defective pixel detection method in which whether or not a pixel that is the subject for detection is a defective pixel is determined by comparison with an output value from the neighboring pixels.